package com.example.jixeishi1.service.impl;

import com.example.jixeishi1.dao.HotaiDao;
import com.example.jixeishi1.service.HotaiService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HotaiServiceimpl implements HotaiService {
    @Autowired
    HotaiDao hotaiDao;

    @Override
    public PageInfo getpage(int p) {
        PageHelper.startPage(p,5);
        List list=hotaiDao.getuser();
        System.out.println(list);
        PageInfo page=new PageInfo(list,10);
        return page;
    }

    @Override
    public PageInfo getproduct(int p) {
        PageHelper.startPage(p,5);
        List list=hotaiDao.getproduct();
        PageInfo page=new PageInfo(list,10);
        return page;
    }

    @Override
    public PageInfo getproductidcx(String flname, int a) {
        PageHelper.startPage(a,5);
        List list=hotaiDao.getspflcx("电脑");
        PageInfo page=new PageInfo(list,10);

        return page;


    }

    @Override
    public PageInfo getddfenye(int p) {
        PageHelper.startPage(p,5);
        List list=hotaiDao.getddcx();
        PageInfo page=new PageInfo(list,10);

        return page;


    }

}
